//package com.example.myapplication.ui.study;
//
//import android.content.Context;
//import android.graphics.Color;
//import android.util.Log;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.ImageView;
//import android.widget.TextView;
//
//import androidx.annotation.NonNull;
//import androidx.recyclerview.widget.RecyclerView;
//
//import com.example.myapplication.R;
//import com.example.myapplication.ui.home.entity.Data;
//import com.google.android.exoplayer2.ui.PlayerView;
//
//import java.util.List;
//
//
//public class VideoAdsAdapter extends PlayerView {
//
//    private List<Data> adsList;
//
//
//    @NonNull
//    @Override
//    public AdsViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
//        Log.d("打印1","");
//        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_video, parent, false);
//        return new AdsViewHolder(view);
//    }
//
//    @Override
//    public void onBindViewHolder(@NonNull AdsViewHolder holder, int position) {
//        holder.bindData(adsList.get(position),holder.itemView.getContext());
//    }
//
//    @Override
//    public int getItemCount() {
//        return adsList.size();
//    }
//
//    public static class AdsViewHolder extends RecyclerView.ViewHolder {
//
//        private JzvdStd videoView;
//
//        public AdsViewHolder(@NonNull View itemView) {
//            super(itemView);
//            videoView = itemView.findViewById(R.id.jz_video);
//        }
//
//        public void bindData(Data data,
//                             Context context) {
////            // 加载广告图片，这里需要使用图片加载库，如Glide或Picasso
////            Glide.with(context)
////                    .load(R.drawable.ic_launcher_background)
////                    .into(adImageView);
////            textTitleView.setText(data.getTitleName());
////            textTitleView.setTextColor(Color.BLACK);
////
////            textTitleView.setOnClickListener(new View.OnClickListener() {
////                @Override
////                public void onClick(View arg0) {
////                    //调到拨号界面
////                    Log.d("打印1",arg0.toString());
////                }
////
////            });
////            textView.setText(data.getContent());
//            videoView.setUp("http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
//                    , "追龙");
//            videoView.posterImageView.set
//                    .setImage("http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640");
//
//        }
//
//    }
//}